Skip to content

Added parentage functions#59

Open
josuechinchilla wants to merge 17 commits into
developmentfrom
add_parentage_functions
Open

Added parentage functions#59
josuechinchilla wants to merge 17 commits into
developmentfrom
add_parentage_functions

Conversation

@josuechinchilla
Copy link
Copy Markdown
Collaborator

Added 2 parentage functions along with test files for them. updated imporFrom statemetns for ped_check

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates package exports/imports to support new pedigree/parentage-related functionality, including exposing validate_pedigree() and tightening check_ped() dependency declarations.

Changes:

  • Export validate_pedigree() and add its data.table roxygen imports.
  • Replace broad @import directives in check_ped() with more specific @importFrom entries.
  • Regenerate/update NAMESPACE accordingly (including adding tools::file_path_sans_ext and janitor::clean_names imports).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
R/validate_pedigree.R Adds @importFrom data.table ... for validate_pedigree() and ensures it’s exported.
R/check_ped.R Switches roxygen imports to @importFrom for dplyr/janitor and adds tools::file_path_sans_ext.
NAMESPACE Updates exports/imports to match roxygen (adds export(validate_pedigree), switches janitor import style, adds additional dplyr imports).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/validate_pedigree.R Outdated
Comment thread R/check_ped.R Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 54.51713% with 146 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.96%. Comparing base (ccc0952) to head (f798362).

Files with missing lines Patch % Lines
R/find_parentage.R 16.45% 66 Missing ⚠️
R/validate_pedigree.R 32.63% 64 Missing ⚠️
R/check_ped.R 89.11% 16 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development      #59      +/-   ##
===============================================
- Coverage        81.53%   78.96%   -2.58%     
===============================================
  Files               23       23              
  Lines             2616     2814     +198     
===============================================
+ Hits              2133     2222      +89     
- Misses             483      592     +109     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josuechinchilla josuechinchilla removed the request for review from alex-sandercock April 23, 2026 20:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

man/validate_pedigree.Rd:90

  • The function always writes corrected_pedigree.txt to the working directory (even when write_results = FALSE), but this side-effect isn’t documented here. Please document this output file (including when it’s written and how it relates to write_results) so users aren’t surprised by unexpected files in their working directory.
\description{
Validates parent-offspring trios by calculating Mendelian error rates from
SNP genotype data. Identifies incorrect parentage assignments and suggests
best-matching replacements. If a list of founders is supplied, trios that
are declared founders (both parents coded as 0) are preserved unchanged
with no recommendations. Trios removed due to missing genotype data are
retained in the output with a NO_GENOTYPE_DATA status.
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/find_parentage.R Outdated
Comment thread R/find_parentage.R
Comment thread R/find_parentage.R Outdated
Comment thread R/check_ped.R Outdated
Comment thread R/check_ped.R Outdated
Comment thread R/validate_pedigree.R Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread NAMESPACE
Comment thread R/validate_pedigree.R
Comment thread man/validate_pedigree.Rd Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

NAMESPACE:33

  • NAMESPACE no longer imports janitor, and a repo-wide search shows no remaining janitor:: usage. However, DESCRIPTION still lists janitor under Imports, which will typically trigger an R CMD check NOTE about unused imports. Either remove janitor from DESCRIPTION or reintroduce an actual use/import as appropriate.
import(dplyr)
import(parallel)
import(quadprog)
import(stringr)
import(tibble)
import(tidyr)
import(vcfR)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R
Comment thread R/check_ped.R Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/check_ped.R
Comment thread R/find_parentage.R Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 19 changed files in this pull request and generated 7 comments.

Files not reviewed (6)
  • man/allele_freq_poly.Rd: Language not supported
  • man/check_ped.Rd: Language not supported
  • man/find_parentage.Rd: Language not supported
  • man/imputation_concordance.Rd: Language not supported
  • man/solve_composition_poly.Rd: Language not supported
  • man/validate_pedigree.Rd: Language not supported
Comments suppressed due to low confidence (1)

DESCRIPTION:66

  • janitor remains listed under Imports, but there are no longer any janitor:: (or clean_names) usages in the R sources. This makes janitor an unnecessary hard dependency; consider removing it from DESCRIPTION Imports if it's truly unused.
Imports: 
    parallel,
    dplyr,
    Rdpack (>= 0.7),
    readr (>= 2.1.5),
    reshape2 (>= 1.4.4),
    rlang,
    tidyr (>= 1.3.1),
    vcfR (>= 1.15.0),
    Rsamtools,
    Biostrings,
    pwalign,
    janitor,
    quadprog,
    tibble,
    stringr,
    data.table
Suggests: 

Comment thread R/check_ped.R Outdated
Comment thread R/check_ped.R
Comment thread R/check_ped.R
Comment thread tests/testthat/test-check_ped.R Outdated
Comment thread man/check_ped.Rd
Comment thread NAMESPACE
Comment thread R/imputation_concordance.R
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 20 changed files in this pull request and generated 4 comments.

Files not reviewed (6)
  • man/allele_freq_poly.Rd: Language not supported
  • man/check_ped.Rd: Language not supported
  • man/find_parentage.Rd: Language not supported
  • man/imputation_concordance.Rd: Language not supported
  • man/solve_composition_poly.Rd: Language not supported
  • man/validate_pedigree.Rd: Language not supported

Comment thread NAMESPACE
Comment on lines +66 to +72
importFrom(ggplot2,aes)
importFrom(ggplot2,element_text)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,labs)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_minimal)
Comment thread R/check_ped.R
}

missing_parents <- distinct(missing_parents)
missing_parents <- dplyr::distinct(missing_parents)
Comment thread R/find_parentage.R
id = progeny_ids,
male_parent = NA_character_,
female_parent = NA_character_,
mendelian_error_pct = NA_character_,
Comment thread R/find_parentage.R
ggplot2::geom_vline(xintercept = error_threshold,
linetype = "dashed", color = "black", linewidth = 1) +
ggplot2::scale_x_continuous(breaks = seq(0, 100, by = 5)) +
ggplot2::scale_y_continuous(breaks = seq(0, 10000, by = 5)) +
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in_progress not ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants